package lesson01;

import java.io.*;

public class Demo0105 {
    public static void main(String[] args) throws IOException {
        File file=new File("./TestInput.txt");
        file.createNewFile();
        FileInputStream fileInputStream=new FileInputStream(file);
        byte[] bytes=new byte[1024];
        while (true){
            //读取字节
            int len =fileInputStream.read(bytes);
            if(len==-1)break;
            //System.out.println(len);
            for (int i = 0; i < len; i++) {
                System.out.println(bytes[i]);
            }
        }
        fileInputStream.close();
        //FileOutputStream fileOutputStream=new FileOutputStream(file);

    }
}
